package com.zhaopin.springboot.web;

import com.zhaopin.springboot.service.StudentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author Administrator
 * @create 2021-04-25 10:49
 */

@Slf4j
@Controller
public class StudentController {
    @Autowired
    private StudentService studentService;

    @RequestMapping(value = "/student/count")
    public @ResponseBody
    Object allStudentCount() {
        log.info("-----------查询开始------------");
        Long allStudentCount = studentService.queryAllStudentCount();
        log.info("-----------查询结束------------");
        return "学生总人数为：" + allStudentCount;
    }
}
